package com.sgb.kjwl.view.ui.activity.transport.driver.goods;

import androidx.databinding.DataBindingUtil;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.DialogFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.sgb.kjwl.R;
import com.sgb.kjwl.databinding.DialogMyPriceBinding;


/**
 * @author liuchenxi
 * 我的报价
 */
public class MyPriceDialogFragment extends DialogFragment {
    DialogMyPriceBinding mBinding;

    public MyPriceDialogFragment() {
    }

    public static MyPriceDialogFragment newInstance(String title) {
        MyPriceDialogFragment fragment = new MyPriceDialogFragment();
        Bundle bundle = new Bundle();
        bundle.putString("title", title);
        fragment.setArguments(bundle);
        return fragment;
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
        mBinding = DataBindingUtil.inflate(inflater, R.layout.dialog_my_price, container, false);
        mBinding.setEvent(new EventListener());
        return mBinding.getRoot();
    }

    public class EventListener {
        public void confirm(View view) {
            dismiss();
        }

        public void exit(View view) {
            dismiss();
        }
    }
}